<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/my.css" />
</head>

<body>
    <div class="nav_top ui-row teamlist bottom_bj">
        <ul>
            <li class="active">
                团队明细
            </li>
        </ul>
    </div>
    <div class="teaminfo">
        <div class="user-infor-box">
            <div class="user-infor" id="myuserlist">

            </div>
        </div>
    </div>
    <!--加载loading-->
    <div class="index_loading">
        <img src="./image/index_loading.gif" />
        <span>加载中,请稍后...</span>
    </div>
    <!--暂无数据-->
    <div class="temporarily_data" style="display:none;">
        <img src="./image/no_date.png" />
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/config.js"></script>
<script type="text/javascript" src="../../script/zepto.min.js"></script>
<script type="text/javascript" src="../../script/doT.min.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script id="todaymyuserlist" type="text/x-dot-template">
    {{? it && it.length>0}} {{ for(var i=0, catlen=it.length; i
    <catlen; i++) {}} <div class="top-infor aui-broder-b">
        <div class="left" style="float:left"><img src="{{=it[i].avatar}}" class="user-img" onerror="this.src='./image/default_avatar.png'"/>
            <text class="publicStyleLength nickname nickname_style">
  				 {{=it[i].realname || it[i].username || it[i].taobao_user_nick || it[i].wxnick || it[i].qqnick||$api.getStorage('appSetInfo').app_name}}
  					</text>
        </div>
        <div class="right fr" style="float: left">
            <text>({{=(it[i].mobile).replace(/^(\d{4})\d{4}(\d+)/,"$1****$2")}})</text>
            <text>注册时间:{{=it[i].reg_time}}</text>
        </div>
        </div>
        {{}}} {{??}}
        <center><img src="./image/no_date.png" /></center>
        {{?}}
</script>
<script type="text/javascript">
    var pageParam = {
        pageindex: 1,
        isloaded: true,
    };
    apiready = function() {
        getMyTeamDeatil();
        getMoreGoods(function() {
            pageParam.pageindex++;
            getMyTeamDeatil();
        })
    };

    function getMyTeamDeatil() {
        if (!pageParam.isloaded) {
            return;
        }
        $('.temporarily_data').hide();
        $(".index_loading").show();
        postDataLogin('getMyTeamDetail', pageParam, function(ret) {
            $(".index_loading").hide();
            if (ret.code == 1) {
                var list = doT.template(($('#todaymyuserlist')).text());
                $("#myuserlist").append(list(ret.data));
            } else {
                pageParam.isloaded = false;
                if (pageParam.pageindex == 1) {
                    $('.temporarily_data').show();
                } else {
                    $(".index_loading img").hide();
                    $(".index_loading span").html("<div style='color:#dddddd;padding-left:30px'>—这是我的底线—</div>");
                    $(".index_loading").show();
                }
            }

        });
    }
</script>

</html>
